using UnityEngine;

public class Alarm
{
    private readonly Vector2Int source;
    private readonly float radius;

    public Alarm(Vector2Int _source, float _radius)
    {
        source = _source;
        radius = _radius;
    }

    public bool Spread(Vector2Int position)
    {
        return (position - source).sqrMagnitude < radius * radius;
    }
}
